package de.hmm.hwip.connection.client;

import de.hmm.hwip.gui.api.IRequest;

public class GuiCommandReceiver implements IRequest {

	@Override
	public void sendCommand(String command) {
		if(command.equals("close")){
			//Activator.setOpen(false);
			Activator.closeSocket();
		}else if(command.equals("open")){
			try {
				//Activator.setOpen(true);
				new Activator().start(Activator.getContext());
			} catch (Exception e) {
				System.out.println("unable to reopen channel");
			}
		}else if(command.equals("rest")){
			Activator.getRest();
		}
	}

}
